#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n, x;
    cin >> n >> x;
    int arr[n];
    for (int i = 0; i < n; i++)cin >> arr[i];

    int left = 0, right = 0;
    int sum = 0, l = 0, r = 0x3f3f3f3f;
    while (right < n)
    {
        sum += arr[right];
        while (sum >= x)
        {
            if (right - left < r - l) l = left, r = right;

            sum -= arr[left++];
        }
        right++;
    }
    cout << l + 1 << ' ' << r + 1;
    return 0;
}